<!doctype html>
<html class="no-js">
<include file="Public:top"/>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Amaze UI Admin index Examples</title>

<!--[if lte IE 9]><p class="browsehappy">升级你的浏览器吧！ <a href="http://se.360.cn/" target="_blank">升级浏览器</a>以获得更好的体验！</p><![endif]-->
</head>
<body>
<header class="am-topbar admin-header">
      <include file="Public:header"/>
</header>
<div class="am-cf admin-main"> 
      <include file="Public:left"/>
<div class=" admin-content">	
		<div class="daohang">
			<ul>
				<li><button type="button" class="am-btn am-btn-default am-radius am-btn-xs"> 首页 </li>
				<li><button type="button" class="am-btn am-btn-default am-radius am-btn-xs">帮助中心<a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close="">×</a></button></li>
				<li><button type="button" class="am-btn am-btn-default am-radius am-btn-xs">奖金管理<a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close="">×</a></button></li>
				<li><button type="button" class="am-btn am-btn-default am-radius am-btn-xs">产品管理<a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close="">×</a></button></li>				
			</ul>	
</div>
<div class="admin-biaogelist">
    <div class="listbiaoti am-cf">
      <ul class="am-icon-users"> 会员管理</ul>    
      <dl class="am-icon-home" style="float: right;">当前位置： 首页 > <a href="#">商品列表</a></dl>     
      <dl>
        <a  class="am-btn am-btn-danger am-round am-btn-xs am-icon-plus" onclick="member_add()" > 手动添加会员</a>
      </dl>
      <!--这里打开的是新页面-->   
    </div>
    <form class="am-form am-g">
          <table width="100%" class="am-table am-table-bordered am-table-radius am-table-striped">
            <thead>
              <tr class="am-success">
                <th class="table-id">ID</th>
                <th class="table-title">会员名称</th>
                <th class="table-type">会员真实姓名</th>
                <th class="table-author am-hide-sm-only">启用/禁用 <i class="am-icon-check am-text-warning"></i> <i class="am-icon-close am-text-primary"></i></th>
                <th class="table-author am-hide-sm-only">会员手机号码</th>
                <th class="table-date am-hide-sm-only">会员邮箱</th>
                <th width="130px" class="table-set">操作</th>
              </tr>
            </thead>
            <tbody>
            <foreach name="arr" item="v">
              <tr>      
                <td>{$v.user_id}</td>        
                <td>{$v.user_name}</td>
                <td><a href="#">{$v.user_truename}</a></td>
                <if condition="$v.user_state eq 0">
                  <td class="am-hide-sm-only"><i class="am-icon-check am-text-warning"></i></td>
                  <else/>
                  <td class="am-hide-sm-only"><i class="am-icon-close am-text-primary"></i></td>
                </if>
                <td class="am-hide-sm-only">{$v.user_phone}</td>
                <td class="am-hide-sm-only">{$v.user_email}</td>
                <td>      
                  <div class="am-btn-toolbar">
                    <div class="am-btn-group am-btn-group-xs">
                      <a class="am-btn am-btn-default am-btn-xs am-text-secondary am-round"  title="禁用/启用" onclick="member_upd({$v['user_id']},{$v['user_state']})"><span class="am-icon-pencil-square-o"></span></a>
                    </div>
                  </div>            
                </td>
                </foreach>
              </tr>
            </tbody>
          </table>        
          <ul class="am-pagination am-fr">
                <li class="am-disabled"><a href="#">«</a></li>
                <li class="am-active"><a href="#">1</a></li>
                <li><a href="#">2</a></li>
                <li><a href="#">3</a></li>
                <li><a href="#">4</a></li>
                <li><a href="#">5</a></li>
                <li><a href="#">»</a></li>
              </ul>
          <hr />
        </form>
 <div class="foods">
    <include file="Public:footer"/>
</div>
</div>
</div>
</div>
<!--[if lt IE 9]>
<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="assets/js/polyfill/rem.min.js"></script>
<script src="assets/js/polyfill/respond.min.js"></script>
<script src="assets/js/amazeui.legacy.js"></script>
<![endif]--> 
<!--[if (gte IE 9)|!(IE)]><!--> 
<script src="assets/js/amazeui.min.js"></script>
<!--<![endif]-->
<script>
 function member_upd(id,state){
    layui.use('layer', function () {
      var layer = layui.layer;
      layer.confirm('确定修改？',{icon:3,title:'修改'}, function (index) {
          $.get('member_upd?id='+id+'&state='+state,function(data){
              if(data == 1){
                  layer.msg('修改成功!',{icon:6,time:500}, function () {
                      location.href = location.href;
                })
            }
        })
    })
})
}
</script>
</body>
</html>